from django.conf.urls import url
from user import views

app_name = 'user'
urlpatterns = [
    url(r'^index/$', views.index, name='index'),                                  # 个人中心首页
    url(r'^borrowing/$', views.borrowing, name='borrowing'),                     # 未还图书
    url(r'^all_borrow/$', views.all_borrow, name='all_borrow'),                  # 借阅记录
    url(r'^bookbill/$', views.bookbill, name='bookbill'),    # 借书单页面
    url(r'^add_bookbill/$', views.add_bookbill, name='add_bookbill'),    # 借书单添加书籍
    url(r'^del_bookbill/(?P<bill_id>[0-9]+)/$', views.del_bookbill, name='del_bookbill'),    # 借书单删除书籍
    url(r'^get_openid/$', views.get_openid),
    url(r'^get_qrcode/$', views.get_qrcode, name="get_qrcode"),
    url(r'^borrow_qrcode/(?P<user_id>[0-9]+)/$', views.borrow_qrcode, name="borrow_qrcode"),
    url(r'^return_qrcode/(?P<user_id>[0-9]+)/$', views.return_qrcode, name="return_qrcode"),
    # 管理员操作
    url(r'^operation/$', views.operation, name="operation"),    # 管理员操作——扫码
    url(r'^borrow/$', views.borrow, name='borrow'),     # 管理员操作——借书
    url(r'^return_book/$', views.return_book, name='return_book'),     # 管理员操作——还书
]